<template>
  <el-drawer
    title="节点修改"
    :visible.sync="drawerVisible"
    :direction="direction"
    :before-close="handleClose"
  >
    <el-form
      :label-position="labelPosition"
      label-width="120px"
      :model="formLabelAlign"
    >
      <el-form-item label="当前节点名称">
        <el-input v-model="formLabelAlign.name"></el-input>
      </el-form-item>
      <el-form-item label="">
        <el-button type="primary" @click="submitForm('numberValidateForm')">提交</el-button>
      </el-form-item>
    </el-form>
  </el-drawer>
</template>

<script>
export default {
  name: "drawer",
  props: {
    // 隐藏/显示
    drawerVisible: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {
      direction: "rtl",
      labelPosition: "right",
      formLabelAlign: {
        name: "",
        region: "",
        type: "",
      },
    };
  },
  methods: {
    handleClose(done) {
      this.$confirm("确认关闭？")
        .then(() => {
          this.$emit("update:drawerVisible", false);
          done();
        })
        .catch(() => {});
    },
  },
};
</script>

<style scoped></style>
